<?php
	$id = $_GET["id"];
	$loi = "";
	if(isset($_POST["ok"])){
		$t = "";
		if($_POST["tt"] == null){
			$loi[] = "Chua nhap trang thai";
		}else{
			$t = $_POST["tt"];
		}
		if($t){
			$edit = new mtrangthai();
			$edit->settt($t);
			$edit->edit($id);
			header("location: index.php?module=trangthai&action=list");
			exit();
		}
	}
	$show = new mtrangthai();
	$data = $show->get($id);
	require ("views/trangthai/vedit.php");
?>